<form class="e-form">
    <input type="hidden" id="id" name="id" value="${object.id}">
    <input type="hidden" name="pId" value="${object.pId}">
    <input type="hidden" id="roles" name="roles" value="${object.roles}">
    @var isSysDepartType = object.id != 0;

    <div class="row">
        <div class="col-md-6 col-12">
            @if(isSysDepartType){
                <#form:input name="上级类型" value="${object.pName}" readonly="${isSysDepartType}"/>
                <#form:input id="code" name="类型代码" value="${object.code}" required="true"/>
            @}
            <#form:input id="name" name="类型名称" value="${object.name}" required="true"/>
            @if(isSysDepartType){
                <div class="form-group row">
                    <label class="col-4 col-form-label">
                        <span class="required">*</span>
                        状态：
                    </label>
                    <div class="col-8">
                        <div class="radio-dict" data-dict-type="commonStatus" data-value="${object.status}" data-name="status" data-required="true"></div>
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-4 col-form-label">
                        备注：
                    </label>
                    <div class="col-8">
                        <textarea class="form-control" id="tips" name="tips">${object.tips}</textarea>
                    </div>
                </div>
            @}
        </div>
        <div class="col-md-6 col-12">
            @if(isSysDepartType){
            <div class="form-group row">
                <label class="col-4 col-form-label">
                    权限：
                </label>
                <div class="col-8">
                    <div class="e-scrollable" data-scrollable="true" style="max-height: 250px">
                        <div id="roles-tree"></div>
                    </div>
                </div>
            </div>
            @}
        </div>
    </div>
    <div class="row">
        <div class="col text-center">
            @if(isSysDepartType){
                <#btn btnType="success" btnClass="" name="保存" icon="la la-save" click="mDepartTypeView.save(this)" permission="sys:depart:type:save"/>
            @}
            @if(isNotEmpty(object.id)){
                @if(isSysDepartType){
                    <#btn btnType="danger" btnClass="" name="删除" icon="la la-remove" click="mDepartTypeView.delete(this)" permission="sys:depart:type:delete"/>
                @}
                <#btn btnType="info" btnClass="" name="新增下级" icon="la la-plus" click="mDepartTypeView.add()"/>
            @}
        </div>
    </div>
</form>
